package com.chen.Dome2reflect;

public class Dog {
    private String name;
    private int age;
    private String address;


    private String eat(String name) {
        System.out.println("有参构造器");
        System.out.println("狗吃"+name);
        return "狗说谢谢";
    }
    private void eat() {
        System.out.println("无参构造器");
    }

    public Dog(String name, int age, String address)
    {
        System.out.println("有参构造器");
        this.name = name;
        this.age = age;
        this.address = address;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "address='" + address + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
